<?php
/**
 * @Author: rocky
 * Date: 2019/10/8
 * Time: 16:21
 */


namespace app\shop\model;


use app\common\model\BaseModel;

class ShopOrderRefund extends BaseModel
{

    public function good(){
        return $this->belongsToMany(ShopOrderGoods::class,'shop_refund_good','order_good_id','refund_id');
    }
    public function order(){
        return $this->belongsTo(ShopOrder::class,'order_id');
    }
    public function getImgAttr($val){
        $val= explode('|',$val);
        return $this->getImgUrl($val);
    }
    public function getAddressInfoAttr($val){
        return json_decode($val,true);
    }

}